package com.wpre.vampiremq.mqserver;

import com.wpre.vampiremq.mqserver.core.Binding;
import com.wpre.vampiremq.mqserver.core.Exchange;
import com.wpre.vampiremq.mqserver.core.MSGQueue;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2025-01-12
 * Time: 15:59
 */
@Mapper
public interface MetaMapper {
    //创建交换机表
    void createExchangeTable();

    //创建队列表
    void createQueueTable();

    //创建binding表
    void createBindingTable();

    //交换机插入删除
    void insertExchange(Exchange exchange);

    void deleteExchange(String exchangeName);

    //队列插入删除
    void insertQueue(MSGQueue queue);

    void deleteQueue(String queueName);

    //binding插入删除
    void insertBinding(Binding binding);

    void deleteBinding(Binding binding);

    //查找
    List<Exchange> selectAllExchanges();

    List<MSGQueue> selectAllQueues();

    List<Binding> selectAllBindings();


}
